package org.acme.controller;

import org.acme.po.SysReview;
import org.acme.service.SysReviewService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RequestMapping(value = "sysReview")
@RestController
public class SysReviewController {

    @Resource
    private SysReviewService sysReviewService;

    /***
     * 获取树形结构数据
     * @return
     */
    @GetMapping(value = "getTree")
    public List<SysReview> getTree() {
        return sysReviewService.getTreeList();
    }

    /***
     * 获取配置信息
     * @param id
     * @return
     */
    @GetMapping(value = "getSysReview")
    public SysReview getSysReview(String id){
        return sysReviewService.getById(10);
    }
}
